from apps.common.base.dao import BaseDao
from apps.system.team.serializers import *

class TeamDao(BaseDao):
    MODEL_CLASS = Team
    SERI_CLASS = TeamBaseSerializer


    def findOneByGrade(self, grade):
        _teams = self.findAll().filter(grade=grade)
        if _teams.exists():
            return _teams.first()
        else:
            print('级别不存在')
            return None